<template>
  <router-view :key="key" />
</template>

<script setup>
import useSettingsStore from "@/store/modules/settings";
import { handleThemeStyle } from "@/utils/theme";
import localforage from "localforage";
import * as Cesium from "cesium";
import {useRoute} from "vue-router";
window.CesiumAll = Cesium;
window.localforage = localforage;
const route = useRoute();

onMounted(() => {
  nextTick(() => {
    handleThemeStyle(useSettingsStore().theme);
  });
});
const key = computed(() => route.fullPath);
</script>

<style lang="scss">
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
@font-face {
  font-family: "YouSheBiaoTiHei";
  src: url("/font/YouSheBiaoTiHei-2.ttf");
}
@font-face {
  font-family: "PingFang SC";
  src: url("/font/PingFang SC.ttf");
}
@font-face {
  font-family: "DigifaceWide";
  src: url("/font/digifacewide.ttf");
}
@font-face {
  font-family: "Digital Numbers";
  src: url("/font/DigitalNumbers.ttf");
}
:deep(.amap-logo) {
  opacity: 0;
}
:deep(.amap-copyright) {
  opacity: 0;
}

.no-header-dialog .el-dialog__header {
  display: none !important;
}

.no-header-dialog.el-dialog {
  top: 207px;
  width: 500px;
  height: 250px;
  border-radius: 4px;
  padding: 80px;
}
.no-header-dialog .el-dialog__body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  img {
    width: 84px;
    height: 84px;
  }

  .dec {
    margin: 20px 0 30px;
    font-size: 14px;
    font-weight: 400;

    .deletecolor {
      color: rgb(255, 190, 115);
    }
  }

  .chooise {
    width: 176px;
    height: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .btn {
      width: 81px;
      height: 32px;
      line-height: 32px;
      text-align: center;
      font-size: 12px;
      font-weight: 400;
      color: rgba(51, 51, 51, 1);
      cursor: pointer;
    }
    .delete {
      color: rgba(51, 51, 51, 1);
      border: 1px solid rgba(237, 237, 237, 1);
      &:hover {
        background: rgba(0, 0, 0, 0.05);
      }
    }

    .success {
      color: #fff;
      background: rgb(43, 193, 123);
      &:hover {
        background: rgba(43, 193, 123, 0.85);
      }
    }
  }
}

.detail-dialog {
  top: 100px;
  width: 600px !important;
  border-radius: 4px !important;
}

.detail-dialog .el-dialog__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 20px;
  height: 58px;
  color: #fff !important;
  // background: rgba(32, 39, 65, 1);

  .el-dialog__title {
    color: #fff !important;
  }
  .el-dialog__headerbtn {
    top: 0 !important;
    width: 58px;
    height: 58px;
    color: #fff !important;
  }
}
.detail-dialog .el-dialog__body {
  padding: 0 20px;

  .dialogBody .dialogItem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;

    .label {
      display: inline-block;
      text-align: right;
      width: 82px;
      height: 20px;
      font-size: 14px;
      font-weight: 400;
    }

    .el-input {
      width: 425px;
      height: 36px;
    }

    .images {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-start;
      align-items: center;
      width: 425px;
      img {
        width: 100px;
        height: 100px;
        border-radius: 4px;
        margin: 0 5px;
      }
    }
  }

  .dialogFoot {
    width: 100%;
    height: 60px;
    line-height: 60px;
    text-align: center;
    margin: 20px 0;
  }
}

.add-dialog {
  top: 100px;
  width: 600px !important;
  border-radius: 4px;
}

.add-dialog .el-dialog__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 20px;
  height: 58px;
  color: #fff !important;
  background: rgba(32, 39, 65, 1);

  .el-dialog__title {
    color: #fff !important;
  }
  .el-dialog__headerbtn {
    top: 0 !important;
    width: 58px;
    height: 58px;
    color: #fff !important;
  }
}
.add-dialog .el-dialog__body {
  padding: 20px;

  .el-input-number,
  .el-select {
    width: 100%;
  }

  .createBtn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 26px;
    width: 98px;
    height: 36px;
    font-size: 12px;
    box-sizing: border-box;
    border-radius: 4px;
    color: rgba(43, 193, 123, 1);
    background: rgba(51, 151, 255, 0.03);
    border: 1px solid rgba(43, 193, 123, 1);
    cursor: pointer;
    &:hover {
      background: rgba(51, 151, 255, 0.1);
    }
  }

  .dialogFoot {
    width: 100%;
    height: 60px;
    line-height: 60px;
    text-align: center;
    // margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    .btn {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 81px;
      height: 32px;
      padding: 10px;
      margin-right: 14px;
      font-size: 14px;
      border-radius: 4px;
      user-select: none;
      border: 1px solid rgba(220, 223, 230, 1);
      cursor: pointer;
      &:hover {
        background: rgba(0, 0, 0, 0.1);
      }
    }
    .btn.search {
      color: #fff;
      background: rgba(43, 193, 123, 1);
      border: 1px solid rgba(43, 193, 123, 1);
      &:hover {
        background: rgba(43, 193, 123, 0.85);
      }
    }
  }
}

.el-date-range-picker .el-picker-panel__footer .is-text {
  display: none;
}

.el-table .el-table__inner-wrapper {
  .el-table__header {
    height: 58px;
  }
  .el-table__body-wrapper tbody tr {
    height: 58px;
  }
}
</style>
